home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5275 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: kikkin.zko.dec.com!carlson
  2. From: carlson@kikkin.zko.dec.com (Tom Carlson)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fopen and VMS help??
  5. Date: 9 Feb 1996 14:53:36 GMT
  6. Organization: Digital Equipment Corporation
  7. Distribution: world
  8. Message-ID: <4ffn5g$g4b@zk2nws.zko.dec.com>
  9. References: <4f6psn$t2v@news.global1.net>
  10. Reply-To: carlson@kikkin.zko.dec.com (Tom Carlson)
  11. NNTP-Posting-Host: kikkin.zko.dec.com
  12. X-Newsreader: mxrn 6.18-16
  13.  
  14.  
  15. In article <4f6psn$t2v@news.global1.net>, youngrc@global1.net writes:
  16. |>I'm writing variable length blocks to a tape in VMS one byte at a time (using C).  How do I specify end of block.  I am using fputc.  
  17. |>Characters in the block could be \n (LF), but when I do a hex dump, those bytes don't appear!  I assume I need to specify the correct 
  18. |>parameters in the fopen().  Can someone help me with the parameters?  Thank you, thank you, thank you!
  19.  
  20. Your question is better asked in comp.os.vms. 
  21.  
  22. However,  add "b" to the 2nd argument to fopen.  If your fopen
  23. currently uses "w" as the second argument, change this
  24. to "wb".  The "b" stands for binary and instructs the RTL not to
  25. attempt to interpret data values such as <LF>.
  26.  
  27. Tom
  28. --
  29.  
  30. Thomas Carlson,   DEC C/ DEC C++     carlson@decc.enet.dec.com
  31. Digital Equipment Corporation,  ZK2-3/N30           
  32. 110 Spitbrook Rd,
  33. Nashua, NH  03062
  34.